<template>
  <el-dialog title="提示" v-model="visibleDialog" :width="520">
    <div class="error-confirm-body">
      <span>
        <i class="iconfont">&#xe8e7;</i>
      </span>
      <div class="error-confirm-title">当前无法发布</div>
      <div class="error-confirm-content">
        <div>
          <p class="error-modal-desc">以下内容不完善，需进行修改</p>
          <div class="error-modal-list">
            <div class="error-modal-item" v-for="(item,index) in list" :key="index">
              <div class="error-modal-item-label">{{ item.stepName }}</div>
              <div class="error-modal-item-content">{{item.description}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <template #footer>
      <el-button @click="visibleDialog = false">我知道了</el-button>
      <el-button type="primary" @click="visibleDialog = false">前往修改</el-button>
    </template>
  </el-dialog>
</template>

<script setup>
import { computed } from 'vue'
let props = defineProps({
  list: {
    type: Array,
    default: () => []
  },
  visible: {
    type: Boolean,
    default: false
  }
})
let emits = defineEmits(['update:visible'])

let visibleDialog = computed({
  get() {
    return props.visible
  },
  set(val) {
    emits('update:visible', val)
  }
})
</script>

<style lang="scss" scoped>
.error-confirm-body .error-confirm-title {
  color: rgba(0, 0, 0, .85);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  display: block;
  overflow: hidden
}

.error-confirm-body .error-confirm-content {
  margin-left: 38px;
  font-size: 14px;
  color: rgba(0, 0, 0, .65);
  margin-top: 8px
}

.error-confirm-body>span {
  display: block;
  float: left;
  margin-right: 16px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: #f5222d;
  .iconfont{
    font-size: 18px;
    color: #fff;
  }
}
</style>